-- BoardScene
-- create by zouyb
-- 公告场景（运用于游戏外重大公告）

require "game/scene/SceneBase"

local BoardScene = class("BoardScene",function()
    return SceneBase.new();
end)

function BoardScene.create()
    local scene = BoardScene.new();
    return scene;
end

function BoardScene:ctor()
    self:setName("BoardScene");

    -- 需要阅读用户协议
    if UserProtocolM.needReadUserProtocol() then
        -- 显示用户协议
        require "game/ui/form/login/UIUserProtocol";
        local ret = UserProtocolM.getUserProtocolInfo();
        local uiUserProtocol = UIUserProtocol.create(ret.title, ret.content);
        self:addForm(uiUserProtocol);
        return;
    end

    -- 创建公告界面
    local uiOutBoard = UIOutBoard.create();
    self:addForm(uiOutBoard);
end

function BoardScene:getSelf()
    return self;
end

return BoardScene
